/*
 * @Description:
 * @Author: Boide
 * @Date: 2021-09-03 17:16:19
 * @LastEditors: guiyi@hongyi.tech
 * @LastEditTime: 2021-09-10 15:47:54
 */
import http from '@/utils/request'

// 查询菜单列表
export const listMenus = (data) => http.get('/menu/listMenus', data)

// 删除菜单
export const menuDeleteId = (id) => http.delete(`/menu/delete/${id}`)

// 新增菜单
export const addMenu = (data) => http.postJson('/menu/addMenu', data)

// 为角色分配菜单
export const addMenuRole = (data) => http.postJson('/menu/addMenuRole', data)

// 根据角色id查询菜单
export const getMenuIdsByRoleId = (roleId) => http.get(`/menu/getMenuIdsByRoleId/${roleId}`)

// 更新菜单
export const updateMenu = (data) => http.putJson('/menu/updateMenu', data)
